package com.chengdu.third.service.Impl;

import com.chengdu.third.dao.ICsrxDao;
import com.chengdu.third.pojo.Csrx;
import com.chengdu.third.service.ICsrxService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author jingbo
 * @create 2021--08--15  21:33
 */

@Service
public class ICsrxServiceImpl implements ICsrxService {

    @Autowired
    private ICsrxDao iCsrxDao;

    @Override
    public List<Csrx> findAll() {
        return iCsrxDao.find();
    }

    @Override
    public void deleteByid(long id) {
         iCsrxDao.delete(id);
    }

    @Override
    public void updateByid(Csrx csrx) {
         iCsrxDao.update(csrx);
    }

    @Override
    public void addcsrx(Csrx csrx) {
         iCsrxDao.add(csrx);
    }

    @Override
    public Csrx getCsrxById(long id) {
        return iCsrxDao.getCsrxById(id);
    }
}
